Technical Q&AHW 18 - Getting the Processor Type and Speed on a PCI Mac (15-July-95)Q I am trying to write an application that, when run on a PCI Mac, queries the Name Registry database for the processor type and speed. I've been unable to find anything in Inside Macintosh: Designing PCI Cards and Drivers on this topic. Where can I find this information? A The Name Registry does not contain this information, but you can obtain it from the Gestalt Manager, just as you did on 68K Macs. This is discussed in Inside Macintosh: Operating System Utilities. If you have a utility that already does this on a 68K Mac, it should also work on a PCI Mac. The code snippet below shows how to get the processor type: // DTS snippet by Wayne Flansburg January 19, 1995 // This snippet calls the Gestalt Manager to read the machine type. #include <stdio.h>#include <GestaltEqu.h> // prototypes void main(void); void main(void) { OSErr iErr = 0; OSType selector = 'mach'; long response = 0; printf("DTS Absolutely Free (Gratis) Snippet\n\n"); iErr = Gestalt(selector,&response); if(!iErr) printf("The informational selector 'mach' is %ld \n", response); else printf("Sorry, an error has occured\n"); } Technical Q&A Previous Question | Contents | Next Question |